﻿@model IEnumerable<Project.Domain.Entities.Match>    
<div id="@ViewBag.leagueid">
    @{var next = 1;}
    @foreach (var match in Model)
    {
        if (next%2 == 0)
        {
            <div class="categoryHeader header_league_l" id="dotnet">
                <div style="" class="title">
                    @string.Format("{0:dd/MM}", match.StartTime) &nbsp;@match.TimePlay
                </div>                
                <div style="width: 297px; text-align:center;" class="title" >
                    @match.HomeTeam.TeamName - @match.AwayTeam.TeamName
                </div>
            </div>
        }
        else
        {
            <div class="categoryHeader header_league_c" id="dotnet">
                <div style="" class="title">
                    @string.Format("{0:dd/MM}", match.StartTime) &nbsp;@match.TimePlay
                </div>
                <div style="width: 297px; text-align:center;" class="title">
                    @match.HomeTeam.TeamName - @match.AwayTeam.TeamName
                </div>
            </div>
        }
        next += 1;
        //list all bet by matchid
        Html.RenderAction("GetBetOfmatch", "Sport", new {matchid = match.MatchId});
    }
</div>